#!/usr/bin/env python
# -*- coding: utf-8 -*-

"""
@author: xiaodun
@date: 2025/9/1920:38
"""
from selenium.webdriver.common.by import By

from dl_auto_test.pages.login_page import LoginPage


class Project_Registration(LoginPage):
    #参与投标：
    Participate_in_registration=(By.XPATH,'//label[text()="参与投标"]')
    #项目登记：
    Project_registration=(By.XPATH,'//label[text()="项目登记"]')
    #退出：
    Exit=(By.XPATH,'//div[text()="退出"]')
    #leftFrame页面:
    leftFrame=(By.XPATH,'//frame[@id="leftFrame"]')
    #topFrame页面
    topFrame=(By.XPATH,'//frame[@id="topFrame"]')
    #main页面
    mainFrame=(By.XPATH,'//frame[@id="main"]')
    #待登记
    daidengji=(By.XPATH,'//a[text()="待登记"]')
    #已登记
    yidengji=(By.XPATH,'//a[text()="已登记"]')


    def __init__(self,driver):
        super().__init__(driver)

    #切换leftFrame
    def switch_to_frame_leftFrame(self):
        self.switch_to_frame(self.leftFrame)

    #切换到topFrame页面
    def switch_to_frame_topFrame(self):
        self.switch_to_frame(self.topFrame)

    #切换到main页面
    def switch_to_frame_main(self):
        self.switch_to_frame(self.mainFrame)

    #退出iframe
    def exit_frame(self):
        self.driver.switch_to.default_content()

    #点击参与投标
    def Participate_in_registration_click(self):
        self.click(self.Participate_in_registration)

    #点击项目登记
    def Project_registration_click(self):
        self.click(self.Project_registration)

    # 点击待登记：
    def dai_deng_ji_click(self):
        self.click(self.daidengji)

    # 点击已登记：
    def yi_deng_ji_click(self):
        self.click(self.yidengji)

    #点击退出
    def exit_click(self):
        self.click(self.Exit)

    #





